<template>
  <div class="home">
    <router-view></router-view>
    <van-tabbar
      v-if="$route.meta.needTab"
      route
      active-color="pink"
      placeholder
      fixed
      inactive-color="#8c8c8c"
      safe-area-inset-bottom
    >
      <van-tabbar-item replace to="/home/index">
        <span>首页</span>
        <template #icon>
          <i class="iconfont icon-shouye"></i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item replace to="/home/question">
        <span>问答</span>
        <template #icon>
          <i class="iconfont icon-wenda"></i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item replace to="/home/play" icon="friends-o">
        <span>视频</span>
        <template #icon>
          <i class="iconfont icon-shipin"></i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item replace to="/home/my">
        <span>我的</span>
        <template #icon> <i class="iconfont icon-wode"></i> </template
      ></van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'Home',
  components: {}
}
</script>

<style lang="less" scoped>
.home {
  height: 100%;
}
</style>
